package com.ssm.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ssm.dao.UserMapper;
import com.ssm.pojo.User;
import com.ssm.service.UserService;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
	private UserMapper userDao;
	
	
	public User getUserInfoById(int id) {
		User user;
		Map<String, Object> map = userDao.getUserInfoById(id);
		String name = (String) map.get("name");
		String pw = (String) map.get("pw");
		user = new User(name, pw);
		return user;
	}
	
	

}
